<?php
/**
 * Created by PhpStorm.
 * User: Liuchenling
 * Date: 5/27/15
 * Time: 21:16
 */
header("Content-Type:audio/mpeg");

function getUrl($word){
    $enc = urlencode($word);
    return "http://translate.google.cn/translate_tts?ie=UTF-8&q=$enc&tl=zh-CN";
};

$str = $_GET['str'];

echo file_get_contents(getUrl($str));